package com.nb.mapper;

import com.nb.vo.DoctorVO.*;
import com.nb.vo.DoctorVO.DoctorBodyOV.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DoctorMapper {

    //    获取医生基本信息
    DoctorGetInfoVO getDoctorById(Integer currentId);

    //    修改个人信息接口
    int updateDoctorById(DoctorModifyInfoVO doctorModifyInfoVO);

    //由科室名称获取科室Id
    String findDepartmentIdByDepartmentName(String departmentName);

    //    发布号源接口
    int doctorPublishSource(DoctorPublishSourceBodyOV doctorPublishSourceBodyOV);

    //    通过用户Id找到医生Id
    String findDoctorIdByUserId(Integer userId);

    //    医生获取待接诊患者列表接口
    List<DoctorGetPatientList> getPatientByDoctorId(Integer doctorId);

    //    医生获取已接诊患者列表接口
    List<DoctorGetConductedPatientList> getConductedPatientByDoctorId(Integer doctorId);

    //     医生获取待接诊订单列表接口
    List<DoctorGetOrderList> getOrderList(Integer doctorId);

    //  提交诊断接口
    int doctorSubmitDiagnosis(DoctorSubmitDiagnosis body);

    //根据医生Id和患者Id找到医嘱表id
    String getMedicalAdviceIdByDoctorIdAndPatientId(DoctorSubmitPrescription body);

    //根据医嘱表id修改医嘱
    int updateMedicalAdviceByMAId(DoctorSubmitPrescription body);

    //根据医生Id和患者Id找到诊疗记录表id
    String getMedicalRecordIdByDoctorIdAndPatientId(DoctorMakePrescription body);

    //根据诊疗记录表id修改医嘱
    int updatePrescriptionByMRId(DoctorMakePrescription body);

    //根据医生Id和患者Id找到诊疗记录表id
    String getMedicalRecordIdByDoctorIdAndPatientId2(DoctorCheckApply body);

    //根据诊疗记录表id修改申请检查表
    int updateExaminationApplicationByMRId(DoctorCheckApply body);

    //根据医生Id和患者Id找到诊疗记录表id
    String getRegistrationOrderIdByMedicalRecordId(DoctorCompleteConduct body);

    //完成接诊接口
    int updateRegistrationOrderMedicalStatusByMRId(DoctorCompleteConduct body);

    //    获取医嘱管理列表
    List<DoctorGetMedicalAdviceList> getMedicalAdviceList(Integer doctorId);

    //    根据医嘱Id获取医生Id
    String getDoctorIdByMedicalAdviceID(DoctorModifyMedicalAdvice body);

    //    根据医嘱Id修改医嘱
    int modifyPrescription(DoctorModifyMedicalAdvice body);

    //    /api/doctor/getConductForm/
    DoctorGetConductForm doctorGetConductForm(DoctorGetConductFormBody body);

    List<DoctorGetSourceList> getSourceList(Integer doctorId);

    String getCopayFeeByDoctorId (Integer doctorId);

    int updateUserAvatar(@Param("userId") Integer userId, @Param("avatarPath") String avatarPath);
}
